import request from '@/utils/request'

// 查询退货列表
export function listOrderReturn(query) {
  return request({
    url: '/mall/orderReturn/list',
    method: 'get',
    params: query
  })
}

// 查询退货详细
export function getOrderReturn(id) {
  return request({
    url: '/mall/orderReturn/' + id,
    method: 'get'
  })
}

// 新增退货
export function addOrderReturn(data) {
  return request({
    url: '/mall/orderReturn',
    method: 'post',
    data: data
  })
}

// 修改退货
export function updateOrderReturn(data) {
  return request({
    url: '/mall/orderReturn',
    method: 'put',
    data: data
  })
}
// 拒绝退货
export function refuseRefund(data) {
  return request({
    url: '/mall/orderReturn/refuseRefund',
    method: 'post',
    data: data
  })
}
// 确认退货
export function sureRefund(data) {
  return request({
    url: '/mall/orderReturn/sureRefund',
    method: 'post',
    data: data
  })
}

// 删除退货
export function delOrderReturn(id) {
  return request({
    url: '/mall/orderReturn/' + id,
    method: 'delete'
  })
}
